<?php


namespace app\miniapp\common;


use app\common\cachemodel\Orders;

class Order
{
    /**
     * 判断档案是否含有已支付的订单
     * @param int $uid
     * @param int $rid
     * @return bool
     * @throws \Exception
     */
    public function getRecodeHasOrderPay(int $uid, int $rid): bool
    {
        $orderModel = new Orders();

        $res = $orderModel->PrepaidUnpaidOrder($uid, $rid, 3, 1);

        if ($res)
        {
            return true;
        }

        $res = $orderModel->PrepaidUnpaidOrder($uid, $rid, 7, 1);

        if ($res)
        {
            return true;
        }

        return false;
    }
}
